// component/comment/comment-wrap.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    isFocusInput: Boolean,
    replyId: String,
    replyName: String
  },

  /**
   * 组件的初始数据
   */
  data: {
    inputPlaceholder: '',
    inputVal: ''
  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleCloseComment() {
      this.triggerEvent('handleCloseComment', {
        isFocusInput: false
      });
    },
    editPlaceholder: function(content) {
      this.setData({
        inputPlaceholder: content
      })
    },
    handleFocusInput (e) {
      this.setData({
        keyboardHeight: e.detail.height
      })
    },
    getInputVal(e) {
      this.triggerEvent('getInputVal', {
        inputVal: e.detail.value
      });
    },
    handleSend () {
      this.triggerEvent('handleSend');
    }
  }
})
